package com.iris.live.services.data.repositories;


import com.iris.live.services.data.models.TFlowupReportModel;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;

/**
 * Created by sxy on 2016/7/12.
 */
@Transactional
public interface FlowupReportRepository extends JpaRepository<TFlowupReportModel, Integer>, JpaSpecificationExecutor<TFlowupReportModel> {
    @Modifying
    @Query("delete from TFlowupReportModel u  WHERE u.followUpdate=?1")
    void deleteByDate(Date date);
}
